顶点小说2[书].js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. var rule = {
  2. 类型: '小说',//影视|听书|漫画|小说
  3. title: '顶点小说2[书]',
  4. host: 'https://www.ddyueshu.cc/',
  5. 编码: 'gb18030',
  6. url: '/fyclass/#fypage',
  7. searchUrl: '/xiaoshuodaquan/#key=',
  8. searchable: 2,
  9. quickSearch: 0,
  10. filterable: 1,
  11. filter: '',
  12. filter_url: '',
  13. filter_def: {},
  14. headers: {
  15. 'User-Agent': 'MOBILE_UA',
  16. },
  17. timeout: 5000,
  18. hikerListCol: "text_1",
  19. hikerClassListCol: "text_1",
  20. //class_name: '全本',
  21. //class_url: '0',
  22. class_parse: '.nav&&ul&&li;a&&Text;a&&href;.*/(.*?)/',
  23. cate_exclude: '书架|排行',
  24. play_parse: true,
  25. lazy: $js.toString(() => {
  26. let html = request(input);
  27. let title = pdfh(html, '.bookname&&h1&&Text');
  28. let content = pdfh(html, '#content&&Html').replace(/\n/g, "").split("<br>").filter(v => v).slice(0, -2).join("\n").replace(/&nbsp;/g, ' ');
  29. let ret = JSON.stringify({
  30. title,
  31. content
  32. });
  33. input = {parse: 0, url: 'novel://' + ret, js: ''};
  34. }),
  35. double: false,
  36. 推荐: '#newscontent&&ul&&li;.s2&&Text;;.s5&&Text;a&&href',
  37. 一级: $js.toString(() => {
  38. let d = [];
  39. if (MY_CATE == '0') {
  40. input = urljoin(rule.host, '/quanben/' + MY_PAGE);
  41. let html = request(input);
  42. let lis = pdfa(html, 'table.grid&&tr:gt(0)');
  43. lis.forEach(it => {
  44. d.push({
  45. title: pdfh(it, 'a&&Text'),
  46. desc: pdfh(it, 'a:eq(1)&&Text'),
  47. img: "",
  48. url: pd(it, 'a&&href', MY_URL),
  49. });
  50. });
  51. } else {
  52. let html = request(input.split('#')[0]);
  53. let lis = pdfa(html, '.up&&ul&&li');
  54. lis.forEach(it => {
  55. d.push({
  56. title: pdfh(it, '.s2&&Text'),
  57. desc: pdfh(it, '.s4&&Text'),
  58. img: "",
  59. url: pd(it, 'a&&href', MY_URL),
  60. });
  61. });
  62. }
  63. setResult(d);
  64. }),
  65. 二级: {
  66. title: 'h1&&Text',
  67. img: '#fmimg&&img&&src',
  68. desc: '#info&&p:eq(-1)&&Text',
  69. content: '#intro&&p&&Text',
  70. tabs: '#list&&dt&&b',
  71. lists: '#list&&dd',
  72. tab_text: 'b&&Text',
  73. list_text: 'body&&Text',
  74. list_url: 'a&&href',
  75. list_url_prefix: '',
  76. },
  77. 搜索: $js.toString(() => {
  78. let html = request(input.split('#')[0]);
  79. let key = decodeStr(KEY, rule.编码);
  80. //log(key);
  81. let lis = pdfa(html, '.novellist&&ul&&li').filter(it => it.includes(key));
  82. let d = [];
  83. lis.forEach(it => {
  84. d.push({
  85. title: pdfh(it, 'a&&Text'),
  86. desc: "",
  87. img: "",
  88. url: pd(it, 'a&&href', MY_URL),
  89. })
  90. });
  91. setResult(d);
  92. }),
  93. }